<?php

namespace wechat\tests\functional\help;

use wechat\help\WechatOpenidScanHelp;

/**
 * Created by PhpStorm.
 * User: shutao
 * Date: 2019-01-11
 * Time: 10:08
 */
class WechatOpenidScanHelpMock extends WechatOpenidScanHelp
{

    protected function requestData()
    {
        if (!$this->_next_openid) {
            return [
                'total' => 4,
                'count' => 2,
                'data' => [
                    'openid' => [
                        'oNyvw03tFXufFI0zZf5aZi8I6EQg',
                        'oNyvw01F8rkEdAkV8TKc0-6CKYl4'
                    ]
                ],
                'next_openid' => 'oNyvw01F8rkEdAkV8TKc0-6CKYl4'
            ];
        } elseif ('oNyvw01F8rkEdAkV8TKc0-6CKYl4' == $this->_next_openid) {
            return [
                'total' => 4,
                'count' => 2,
                'data' => [
                    'openid' => [
                        'oNyvw03tFXufFI0zZf5aZi8I6EQg-1',
                        'oNyvw01F8rkEdAkV8TKc0-6CKYl4-2'
                    ]
                ],
                'next_openid' => 'oNyvw01F8rkEdAkV8TKc0-6CKYl4-2'
            ];
        } else {
            return [
                'total' => 2,
                'count' => 0,
                'next_openid' => ''
            ];
        }
    }
}